package collegemenu;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
// 봉사활동
public class service extends JPanel {

	/**
	 * Create the panel.
	 */
	public service() {
		JFrame frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		String[] colwmn ={"봉사활동일시","활동장소","봉사활동내용","봉사활동 시간"};
		String[][] row = {{"2013-12-22","구로","사회봉사","8시간"},
							{"2013-12-22","구로","사회봉사","8시간"},
							{"2013-12-22","구로","사회봉사","8시간"}};
						
		
		JPanel panel = new JPanel();
		panel.setPreferredSize(new Dimension(10, 30));
		frame.getContentPane().add(panel, BorderLayout.AFTER_LAST_LINE  );
		panel.setLayout(new BorderLayout(0, 0));
		
		JPanel panel_1 = new JPanel();
		panel.add(panel_1, BorderLayout.EAST);
		
		JButton btnNewButton = new JButton("누적시간");
		panel_1.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("확인");
		panel_1.add(btnNewButton_1);
				
		JTable table = new JTable(row,colwmn);
		
		//JPanel panel = new JPanel();
		//frame.getContentPane().add(panel, BorderLayout.NORTH);
		frame.getContentPane().add(new JScrollPane(table));
		frame.setSize(450,300);
		frame.setVisible(true);
		

	}

}
